import request from '@/utils/request'

export function sendRegisterCode(email) {
  return request({
    url: '/users/register/code',
    method: 'post',
    params: { email }
  })
}

export function register(data) {
  return request({
    url: '/users/register',
    method: 'post',
    data
  })
}

export function login(data) {
  return request({
    url: '/users/login',
    method: 'post',
    data
  })
}

export function sendLoginCode(data) {
  return request({
    url: '/users/login/code/send',
    method: 'post',
    data
  })
}

export function loginByEmail(data) {
  return request({
    url: '/users/login/email',
    method: 'post',
    data
  })
} 